import { http } from "@/uni-sub-base/service/request.js"
import configs from "@/config/config.js"
let serviceName = "Supplier/"
import { getBaseUrls } from "@/utils/appUrl.js"
//验证供应商
export function CheckSupplier(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "CheckSupplier" + path,
    })
}

// 申请供应商
export function Apply(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "Apply" + path,
        data,
    })
}
// 供应商信息
export function GetSupplierInfo() {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetSupplierInfo",
    })
}
// 供应商首页
export function GetSupplierIndex() {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetSupplierIndex",
    })
}
//发货信息
export function GetAddressList() {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetAddressList",
    })
}
//识别地址
export function mapbatchSmartParse(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "BatchSmartParse",
        data,
    })
}

//获取报价表
export function GetProductToSupplierList(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetProductToSupplierList" + path,
        data,
    })
}

//获取报价审核
export function GetOfferSkuPriceList(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetOfferSkuPriceList" + path,
        data,
    })
}

//撤回报价
export function WithdrawOfferSkuPrices(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "WithdrawOfferSkuPrices" + path,
        data,
    })
}

//编辑保存报价
export function EditOfferSkuPrices(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "EditOfferSkuPrices",
        data,
    })
}

//保存报价
export function SaveOfferSkuPrices(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "SaveOfferSkuPrices",
        data,
    })
}

//获取供应商通知数据
export function GetMessageAlertList(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetMessageAlertList" + path,
        data,
    })
}

//点击事件即阅读消息
export function ReduceAlert(data, path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "ReduceAlert" + path,
        data,
    })
}
export function GetProductToSupplierModel(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetProductToSupplierModel" + path,
    })
}

//供应商信息修改保存
export function SaveSupplierInfo(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "SaveSupplierInfo",
        data,
    })
}
//未登录入驻信息
export function GetSupplierInfoEx(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetSupplierInfoEx" + path,
    })
}
//供应商信息修改保存
export function SaveSupplierInfoEx(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "SaveSupplierInfoEx",
        data,
    })
}
//获取切换商户数据
export function GetAdminUserSystemList(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetAdminUserSystemList",
        data,
    })
}
//全部已读
export function AllReduceAlert() {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "AllReduceAlert",
    })
}
//获取常用快递
export function GetExpressList(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetExpressList" + path,
    })
}
//获取供应商发货地址(分页)
export function GetAddressPageList(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetAddressPageList",
        data,
    })
}
//获取供应商发货地址信息
export function GetUserAddressInfo(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "GetUserAddressInfo" + path,
    })
}
//新增或编辑供应商发货地址
export function UpdateUserAddress(data) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "UpdateUserAddress",
        data,
    })
}
//删除供应商发货地址
export function DeleteUserAddress(path) {
    return http.post({
        url: getBaseUrls().baseUrlSupplier + serviceName + "DeleteUserAddress" + path,
    })
}
